/*    */ package com.zimbra.cs.filter.jsieve;
/*    */ 
/*    */ import com.google.common.base.Objects;
/*    */ import com.google.common.base.Objects.ToStringHelper;
/*    */ import com.google.common.collect.ImmutableMap;
/*    */ import com.google.common.collect.ImmutableMap.Builder;
/*    */ import com.zimbra.cs.mailbox.Flag.FlagInfo;
/*    */ import java.util.Map;
/*    */ import org.apache.jsieve.mail.Action;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public final class ActionFlag
/*    */   implements Action
/*    */ {
/* 31 */   private static final Map<String, ActionFlag> FLAGS = ImmutableMap.builder().put("read", new ActionFlag(Flag.FlagInfo.UNREAD, false, "read")).put("unread", new ActionFlag(Flag.FlagInfo.UNREAD, true, "unread")).put("flagged", new ActionFlag(Flag.FlagInfo.FLAGGED, true, "flagged")).put("unflagged", new ActionFlag(Flag.FlagInfo.FLAGGED, false, "unflagged")).put("priority", new ActionFlag(Flag.FlagInfo.PRIORITY, true, "priority")).put("unpriority", new ActionFlag(Flag.FlagInfo.PRIORITY, false, "priority")).build();
/*    */   
/*    */ 
/*    */   private final Flag.FlagInfo flag;
/*    */   
/*    */ 
/*    */   private final boolean set;
/*    */   
/*    */ 
/*    */   private final String name;
/*    */   
/*    */ 
/*    */   public static ActionFlag of(String name)
/*    */   {
/* 45 */     return (ActionFlag)FLAGS.get(name);
/*    */   }
/*    */   
/*    */   private ActionFlag(Flag.FlagInfo flag, boolean set, String name) {
/* 49 */     this.flag = flag;
/* 50 */     this.set = set;
/* 51 */     this.name = name;
/*    */   }
/*    */   
/*    */   public Flag.FlagInfo getFlag() {
/* 55 */     return this.flag;
/*    */   }
/*    */   
/*    */   public boolean isSet() {
/* 59 */     return this.set;
/*    */   }
/*    */   
/*    */   public String getName() {
/* 63 */     return this.name;
/*    */   }
/*    */   
/*    */   public String toString()
/*    */   {
/* 68 */     return Objects.toStringHelper(this).add("name", this.name).add("set", this.set).toString();
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/filter/jsieve/ActionFlag.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */